package com.zt.controller;

import com.zt.pojo.dto.OrderDto;
import com.zt.pojo.dto.ProductDto;
import com.zt.service.OrderService;
import com.zt.service.ProductService;
import com.zt.util.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date 2025/5/9 19:56
 * @Author neko
 **/
@RestController
@RequestMapping("/product")
public class ProductController {
    @Autowired
    private ProductService productService;

    @RequestMapping("addPro")
    public ResultVo addPro(@RequestBody ProductDto dto){
        return productService.addPro(dto);
    }

    @RequestMapping("addOrder")
    public ResultVo addOrder(@RequestBody OrderDto dto){
        return productService.addOrder(dto);
    }
}
